'use strict';

module.exports = app => {
    class LikeController extends app.Controller {

        //点赞
        async clicklike() {
            const params = this.ctx.request.body;
            const like = await this.service.like.clicklike(params);
            this.success(like.message);
        }

        //取消点赞
        async noclicklike(){
            const params = this.ctx.request.body;
            const post = await this.service.like.noclicklike(params);
            this.success();
        }
    }
    return LikeController;
};

